
; Regla que recomienda el modelo 13-1150es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule 13-1150es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core2Duo SL9600")))
	(test (or (eq ?v1 0.0)(<= ?v1 2.13)))
	(test (or (eq ?v2 0.0)(>= ?v2 2.13)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 3)))
	(test (or (eq ?mem2 0)(>= ?mem2 3)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 250)))
	(test (or (eq ?tam2 0)(>= ?tam2 250)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 13.1)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 13.1)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "ATI")))
	(test (or (eq ?graf "n")(eq ?graf "Mobility Radeon HD 4330")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 1.7)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 1.7)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1899)))
	(test (or (eq ?p2 0.0)(>= ?p2 1899)))
	=>
	(assert (modelo_aconsejado (modelo Envy:13-1150es)))
)

; Regla que recomienda el modelo 15-1150es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule 15-1150es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core i7-720QM")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.6)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.6)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 6)))
	(test (or (eq ?mem2 0)(>= ?mem2 6)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 500)))
	(test (or (eq ?tam2 0)(>= ?tam2 500)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "ATI")))
	(test (or (eq ?graf "n")(eq ?graf "Mobility Radeon HD 5830")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.35)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.35)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1695)))
	(test (or (eq ?p2 0.0)(>= ?p2 1695)))
	=>
	(assert (modelo_aconsejado (modelo Envy:15-1150es)))
)

; Regla que recomienda el modelo 13-1050es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule 13-1050es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core2Duo SL9400")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.86)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.86)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 3)))
	(test (or (eq ?mem2 0)(>= ?mem2 3)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 250)))
	(test (or (eq ?tam2 0)(>= ?tam2 250)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 13.1)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 13.1)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "ATI")))
	(test (or (eq ?graf "n")(eq ?graf "Mobility Radeon HD 4330")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 1.7)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 1.7)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1499)))
	(test (or (eq ?p2 0.0)(>= ?p2 1499)))
	=>
	(assert (modelo_aconsejado (modelo Envy:13-1050es)))
)

; Regla que recomienda el modelo 15-1050es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule 15-1050es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core i7-720QM")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.6)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.6)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 500)))
	(test (or (eq ?tam2 0)(>= ?tam2 500)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "ATI")))
	(test (or (eq ?graf "n")(eq ?graf "Mobility Radeon HD 4830")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.35)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.35)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1595)))
	(test (or (eq ?p2 0.0)(>= ?p2 1595)))
	=>
	(assert (modelo_aconsejado (modelo Envy:15-1050es)))
)
